Florian Müllner [Mon, 21 Feb 2011 18:04:40 +0000 (19:04 +0100)]
panel: Move panel border into the background
In the mockups the bottom border of active panel buttons is drawn
on top of the panel's border. To get this effect, move the panel
border into the background, so that it is not subtracted from the
vertical space given to the buttons. Adjust the drawing of the rounded
corners to reflect that change.
David Zeuthen [Tue, 22 Feb 2011 21:54:08 +0000 (16:54 -0500)]
polkit: return error when authentication dialog is dismissed
This allows PolicyKit applications to disambiguate between when the
authentication dialog is dismissed versus when authentication fails
(e.g. the wrong password has been entered).
See https://bugs.freedesktop.org/show_bug.cgi?id=30653 for more
information.
Since Ubuntu patches clutter-1.0.pc to remove x11 from the requires,
we have to list it explicitly for places we use X11 functions, like
ST and the shell recorder.
No need to Check for grabbed menus on hot corner enter/click
We never get enter events anyway due to the menu code, and if
the user clicks on a non-menu the menu is removed and ungrabbed
before the target actor gets the event anyway.
Adel Gadllah [Wed, 23 Feb 2011 13:34:37 +0000 (14:34 +0100)]
dateMenu: Make sure that the event list fills the available width
Currently the menu has a hardcoded width which result into the hover
effect of the "Open Calendar" item being "cut off" in the middle rather
then reaching to the edge.
To be consistent with other menu items, make it expand to fill the available
space.
Now that we are using Cantarell as the default UI font, some clarity
was reduced in using the calendar. Mockups already address this so
change the font styles in CSS to match the mockups.
Owen W. Taylor [Wed, 23 Feb 2011 00:32:46 +0000 (19:32 -0500)]
Remove minimize and maximize buttons from title bar
The minimize and maximize buttons on the titlebar have lost much of their
utility in GNOME 3: the minimize functionality is largely superceded by
the ability to switch windows in the overview and conveniently use
multiple workspaces, while the maximize functionality is available by
drag to the top gesture or double clicking on the title bar.
Removing these buttons significantly cleans up the default appearance
and avoids exposing a half-done implementation of minimization.
Florian Müllner [Tue, 22 Feb 2011 16:40:32 +0000 (17:40 +0100)]
panel: Defer adding the user status menu to the manager
PopupMenuManager relies on menus being added in the order of the
menu buttons they are attached to, so defer adding the user status
menu until the status icon menus have been added to make the manager
happy.
This patch modifies MessageTray behaviour so that normal (not urgent)
notifications are not shown when the user is Busy (they're sent
immediately to the Summary area). When status is then changed,
notifications still pending are shown again.
Additionally, when status is modified from Idle to anything other than
Busy, the message tray is forced open for 4 seconds, so that summary
icons are visible.
David Zeuthen [Mon, 21 Feb 2011 17:17:34 +0000 (12:17 -0500)]
Add a PolicyKit authentication agent
A PolicyKit Authentication Agent is a construct used to authenticate
one or more identities. See the PolicyKit documentation for more
details on authentication agents and how PolicyKit works:
http://hal.freedesktop.org/docs/polkit/
Since gjs does not support subclassing a GObject class from Javascript
code, we bring in a native class to bridge the VFuncs to GObject
signals. Additionally, this native class also queues up authentication
requests so the user of the native class only has to deal with a
single outstanding request at any one time.
The file js/ui/polkitAuthenticationAgent.js introduces a singleton
that listens for authentication requests via the native class. This
singleton uses the PolkitAgent machinery to do the actual heavy-weight
lifting required for authentication (essentially a PAM conversation).
We currently don't allow the user to pick the identity to be
authenticated.
When retrieving a ShellApp from the GHashTable of child processes,
we need to take an extra reference, that the GHashTable of windows
to apps will own.
Also add some documentation to avoid repeating this bug in the future.
Adel Gadllah [Wed, 16 Feb 2011 20:12:07 +0000 (21:12 +0100)]
shell_global: Use clutter_event_get_time rather then get_current_event_time
Using clutter_get_current_event_time can result into too old timestamps
when there is no current Clutter or Mutter event, since
clutter_get_current_event_time() returns the timestamp of the last event
delivered to Clutter. This can result in, for example, grabs failing. Use
the event time of the current event (if any) and CurrentTime otherwise.
Make the right padding bigger and the left padding smaller, so that the
boundaries that trigger the accordion effect are more closely associated
with corresponding icons. Also slightly decrease the overall padding between
sources.
Complex popup menus require the ability to manager sequences of items
as "sections", to which you can add and and remove items, as well
as hide and show.
PopupMenuSection does exactly that, leveraging the existing machinery
for submenus, but without being exposed as a submenu to the user.
Also, make getMenuItems() private, since it is used for different things
now and may change semantics in the future.
Make all subclasses of PopupMenuBase accept a params argument, which
can be used to make the item non reactive, not responsive to hover
and, as a new feature, with a different style class.
Owen W. Taylor [Mon, 21 Feb 2011 14:32:35 +0000 (09:32 -0500)]
overview: avoid round-off errors when sizing and positioning view selector
We need the view selector to extend all the way to the right edge of the
monitor, so size and position the view selector in a way that the sum of
its X position and its width add up to the primary monitor width.
Florian Müllner [Fri, 18 Feb 2011 01:33:41 +0000 (02:33 +0100)]
panel-buttons: Remove transitions for corner buttons
So far transitions do not work for the custom drawn corners, so to
avoid a visible glitch when transitioning a button in the panel corner
while updating the style of the apparently attached corner instantly,
remove transition of those panel buttons until we make it work for the
custom drawn parts as well.
Florian Müllner [Wed, 9 Feb 2011 02:12:10 +0000 (03:12 +0100)]
panel: Add rounded corners
Current mockups show the panel curving downwards at the edges to
frame the work area and look awesome. Implement those as separate
actors to not affect the struts set by the panel, and synchronize
their state with the corresponding panel buttons so they blend in
with the panel. It might be worth considering whether the corners
should be hidden with maximized windows on the current workspace,
though this might affect the illusion of them being part of the
panel. As the corners don't affect the input region, the small
overlap with windows might not be too bad after all.
Florian Müllner [Sat, 19 Feb 2011 11:21:07 +0000 (12:21 +0100)]
panel: Adjust CSS for RTL locales
The groups at the panel sides use different left/right padding, so
a slightly different CSS is required for RTL locales. Add :rtl
pseudo classes as necessary and adjust the CSS.
Florian Müllner [Fri, 18 Feb 2011 22:00:04 +0000 (23:00 +0100)]
appMenu: Clip app icon when the button is active
We now use a border image on active panel buttons to underline the
button's content. As the property does not affect the content's
allocation, the app icon ends up being drawn on top of the border
image. To prevent this, use a custom property to clip the bottom of
the app icon when the button is active.
Florian Müllner [Wed, 9 Feb 2011 02:11:57 +0000 (03:11 +0100)]
panel: Update style
Update the style of the panel to match the latest mockups.
- add a subtle border at the bottom of the panel
- use a highlight of active panel buttons similar to the one
used for running applications in the dash/app view
- shadow the buttons' label/icon when highlighted
Florian Müllner [Fri, 18 Feb 2011 01:34:45 +0000 (02:34 +0100)]
panel: Move statusmenu initialization in the constructor
While related to the status area, the user status button is clearly
not a status icon, and it does not make too much sense in
startStatusArea(), which is about filling the status area with
icons. Also, the status icon container is added to the panel in
the constructor, in fact, the user status button is the only "toplevel"
panel element which is initialized elsewhere. Not a crucial change,
but makes for a nice read anyway.
Florian Müllner [Thu, 10 Feb 2011 21:11:48 +0000 (22:11 +0100)]
search-entry: Update style
Update the style of the search entry to match the latest mockups[0].
- use a (non-reactive) loupe icon when no search is active
- use themed symbolic icons
- make the entry rounder
- tweak gradient colors
- use an inset shadow
Florian Müllner [Wed, 16 Feb 2011 15:47:46 +0000 (16:47 +0100)]
tests: Add a box-shadow test
The original support for CSS based shadows has been extended with
support for an optional spread radius and the 'inset' keyword,
so with the additional complexity a dedicated test case looks
appropriate.
Florian Müllner [Mon, 14 Feb 2011 01:34:00 +0000 (02:34 +0100)]
st-theme-node: Add support for inset box-shadows
Implement inset box-shadows as in the CSS3 draft[0]. As the shadow
should appear beneath the node's border, we pick the slow cairo based
rendering path (though a cogl based path could be added in case the
node has a solid background with no borders).
Florian Müllner [Mon, 14 Feb 2011 01:07:14 +0000 (02:07 +0100)]
st-shadow: Parse the 'inset' keyword
The box-shadow property in the CSS3 draft[0] supports the optional
'inset' keyword for inner shadows cast onto the background. Add
support for the keyword to the shadow parsing code.
Florian Müllner [Thu, 10 Feb 2011 18:40:01 +0000 (19:40 +0100)]
st-entry: Add API to set an actor as primary/secondary icon
Currently an entry's primary/secondary icon can only be set by
filename. In order to allow using themed icons, add API to set
a generic ClutterActor as icon.
Owen W. Taylor [Mon, 14 Feb 2011 22:13:25 +0000 (17:13 -0500)]
Fix cursor when dragging a window over its current workspace
When we are dragging a window over its current workspace or workspace
thumbnail, we show show "no drop possible" feedback instead
of "move here" feedback.
Owen W. Taylor [Mon, 14 Feb 2011 21:09:10 +0000 (16:09 -0500)]
workspaceThumbnail: fix stacking for newly added actors
We don't necessarily get a syncStacking call when an actor is added
at the top of the workspace, so make sure to set the stackAbove value
for it correctly.
Florian Müllner [Fri, 18 Feb 2011 18:35:17 +0000 (19:35 +0100)]
search-entry: Update hint text
'Search your computer' is problematic for various reasons:
- it specifies the kind of device
- it focuses on local search (while we also do web search)
- it does not advertise the instant search functionality
Change the hint text to 'Type to search' as proposed by Allan Day.
lookingGlass: use new history manager implementation
This starts saving lookingGlass history in gsettings, and also adds
the ability to clear the text field by pressing 'down' on the last
entry, like the run dialog and readline allow.
runDialog and lookingGlass both implement a home-made history
manager, each working slightly differently than each other in
behavior and implementation.
Extract the behavior and implementation from runDialog, which
reads and saves to GSettings.
Florian Müllner [Fri, 18 Feb 2011 23:09:01 +0000 (00:09 +0100)]
date-menu: Adjust boxpointer position for RTL locales
We try to position the boxpointer centered above the calendar,
which swaps position with the events list when using a RTL locale,
so make the menu alignment dependent on the text direction.
Owen W. Taylor [Fri, 18 Feb 2011 15:31:18 +0000 (10:31 -0500)]
Be more careful with workspace thumbnail scale
- When tweening a workspace to collapse it, round the multiplied
height so that we don't change other workspace sizes via rounding
differences.
- Use separate horizontal and vertical scales, so that every thumbnail
has the same horizontal scale.
Owen W. Taylor [Sun, 13 Feb 2011 21:53:15 +0000 (16:53 -0500)]
Omit the panel area from the previewed workspaces
Allow defining a "porthole" that is the visible area of a workspace
thumbnail, and use this to clip the portion under the panel off the
workspace thumbnails. (This is wrong for fullscreen windows, but not
very wrong, and hopefullly the few missing pixels will be
unnoticeable.)
Owen W. Taylor [Sat, 12 Feb 2011 21:33:42 +0000 (16:33 -0500)]
Fix position of indicator while tweening
Because the overall parent allocation width immediately when the workspace
count changes, we were sometimes drawing the indicator in the wrong place
in the indicator animation that proceeded the remove-workspace animation.
Fix this by tweening only the Y position of the indicator and computing
the X position and size in our allocate() method. This also is considerably
simpler than switching the indicator between fixed position and geometry
managed.
Owen W. Taylor [Sat, 12 Feb 2011 21:14:12 +0000 (16:14 -0500)]
Animate workspace indicator before adding/removing workspaces
Rather than killing the workspace indicator indicator when we remove
workspaces because the source and target locations might have changed,
do it as a separate first step. This provides a better explanation
than doing it simultaneously with the addition/removal or not at all
and also keeps our computations simple.
Owen W. Taylor [Sat, 12 Feb 2011 20:23:27 +0000 (15:23 -0500)]
Fix background to animate with thumbnails
When we animating the scale for the thumbnails, the border and
background should wrap around the current size of the thumbails.
The technique that we are using to animate the scale breaks that
since we don't animate the overall size of the thumbnails box -
we just animate our child actors within the allocation.
To fix this, switch from drawing the background by packing in another
container to drawing the background with a separate actor that
is under the other actors and allocated by our custom logic.
Owen W. Taylor [Sat, 12 Feb 2011 19:40:49 +0000 (14:40 -0500)]
Slide workspace thumbnails in when added and out when removed
To explain to the user what is happening, instead of abruptly changing
updating the workspace thumbnail list, slide thubmnails in and out
as they are added and removed.
To implement this, we track a state for each thumbnail and when things
change go through a process of first sliding removed thumbnails out,
then ollapsing the left-over spaces and rescaling the thumbnails, then
finally sliding newly added thumbnails in.
Dan Winship [Wed, 16 Feb 2011 17:02:14 +0000 (12:02 -0500)]
StEntry: remove special redundant hover tracking
For historical reasons, StEntry always did hover tracking when you had
visible hint_text, even if track_hover was FALSE. Remove that special
case, and make entries track hover just like all other widgets do.
If we actually needed to distinguish hovered-with-hint-text from
hovered-without-hint-text (which, at the moment, we don't), we could
do that by setting separate CSS for :hover and :hover:indeterminate.
Florian Müllner [Thu, 17 Feb 2011 19:45:17 +0000 (20:45 +0100)]
a11y: Adjust schemas for screen keyboard
The setting in org.gnome.desktop.default-applications.at
has been removed, use the corresponding setting in
org.gnome.desktop.a11y.applications instead.
Florian Müllner [Thu, 17 Feb 2011 15:15:29 +0000 (16:15 +0100)]
a11y: Adjust schema for screen reader
The setting in org.gnome.desktop.default-applications.at
has been removed, use the corresponding setting in
org.gnome.desktop.a11y.applications instead.
Owen W. Taylor [Wed, 16 Feb 2011 20:17:46 +0000 (15:17 -0500)]
panel: fix app menu visibility after quick overview visit
If you left the overview immediately after entering it (either
intentionally or due to a bug), the app menu would mistakenly end up
hidden due to flaky interaction between its show() and hide() methods.
Owen W. Taylor [Fri, 11 Feb 2011 17:09:23 +0000 (12:09 -0500)]
Scale thumbnails to fit in the vertical space
When we have more thumbnails than can fit in the vertical space, scale
them down. This is implemented by using a generic container so we can
compute positions and sizes on the fly and do the appropriate
width-for-height behavior.
The usage of clutter constraints to position the indicator is droppped
since it less complicated to just position the indicator in the right
place ourselves.
Owen W. Taylor [Thu, 10 Feb 2011 22:15:36 +0000 (17:15 -0500)]
workspacesView: Update zoom scale when controls are reallocated
The scale we zoom to in the "zoomed out" mode depends on the width of the
controls area. Once we rescale the workspaces dynamically, we'll need to
update the zoom scale as we add and remove workspaces.
Owen W. Taylor [Thu, 10 Feb 2011 00:07:27 +0000 (19:07 -0500)]
Use a fixed width for visible portion of workspace thumbnails
We will change the workspace thumbnail size as we get more thumbnails; it doesn't
really make sense to always show 1/5 of the thumbnails how big or small they are,
so instead show a CSS-configurable length.
Owen W. Taylor [Wed, 9 Feb 2011 23:54:46 +0000 (18:54 -0500)]
Improve allocation of workspace controls
Fix a bug in the computation of the zoomed-out scale and use a StBin
instead of an unnecessary StBoxLayout. Using the StBin will allow
correct width-for-height behavior for the controls.
Owen W. Taylor [Wed, 9 Feb 2011 20:48:11 +0000 (15:48 -0500)]
Make a separate class for workspace thumbnails box
Add WorkspaceThumbnail.ThumbnailsBox to handle managing the array
of workspace thumbnails; the logic will get more complex as we add
scaling and animation.